package net.schmurgon.server.domain;

import javax.persistence.Entity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import org.springframework.roo.addon.entity.RooEntity;
import net.schmurgon.gwt.shared.CourseType;
import javax.persistence.Enumerated;
import net.schmurgon.server.domain.Runner;
import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;

@Entity
@RooJavaBean
@RooToString
@RooEntity(identifierField = "id")
public class Run {

    private Integer handicapMinutes;

    private Integer handicapSeconds;

    private Integer startMinutes;

    private Integer startSeconds;

    private Integer finishMinutes;

    private Integer finishSeconds;

    private Integer score;

    private Integer bonus;

    @Enumerated
    private CourseType courseType;

    @ManyToOne(targetEntity = Runner.class)
    @JoinColumn
    private Runner runner;
}
